package top.healthylife.gateway.platform.zzc.api.api;

import cn.hutool.core.bean.BeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.core.util.SystemConfigUtils;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.zzc.api.config.SystemConfig;
import top.healthylife.gateway.platform.zzc.api.util.OutHttpUtil;
import top.healthylife.gateway.platform.zzc.dto.req.ZzcReqBlackListSpecV3Dto;
import top.healthylife.gateway.platform.zzc.dto.res.ZzcResBlackListSpecV3Dto;

/**
 * @author : GaoZeXi
 * @date 2021/3/12 16:33
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20,docUrl ="-",apiName = "个人黑名单", info = "采用统一的黑名单信息入库标准，明确地对客户的欺 诈行为、逾期记录及可疑借贷风险进行区分，联防联控帮助信贷机构发现信 贷风险")
public class ZzcBlackListSpecV3Api implements ParentFace<ZzcReqBlackListSpecV3Dto, ZzcResBlackListSpecV3Dto> {
    /**
     * 正式环境地质
     */
   public final static String URL_PRO = "https://nezha3.intellicredit.cn/api/v3/advanced/search";
    /**
     * 测试环境
     */
   final static String URL_SIT = "https://test3.intellicredit.cn/blacklist/api/v3/advanced/search";


    @Override
    public ZzcResBlackListSpecV3Dto execute(ZzcReqBlackListSpecV3Dto t)  {
        SystemConfig o = (SystemConfig) SystemConfigUtils.get();
        return OutHttpUtil.get(URL_PRO, BeanUtil.beanToMap(t),o,ZzcResBlackListSpecV3Dto.class);
    }
}
